<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 引入vue.js  -->
    <script src="../node_modules/vue/dist/vue.js"></script>
</head>
<body>
    <!-- #app id为app的div -->
    <div id="app">
        <button v-on:click="counter += 1">add 1</button>
        <p>点击次数: {{ counter}}</p>
        <button @click="clickMe">click me </button>

        <!-- <input type="text" v-on:input="test"> -->
    </div>
    <script>
        // 实例化vuejs应用
        var vm = new Vue({
            el: "#app",
            data: {
                counter: 0,
            },
            methods: {
                clickMe() {
                    confirm('method中的clickMe方法')
                },
                // test(event) {
                //   alert(event.target.value)  
                // }
            }
        })
    </script>
</body>
</html>
